package com.tueye.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 
 * @author yue descript: the picture of topics
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "tueye_keywords_info")
public class KeyWords extends BaseEntity {

	private String keyword_name;
	private Integer keyword_clickNum;
	// add by yuyue 09/11/1
	private TopicType topicType;
	private List<Topics> topics;

	// private List<Topics> topics = new ArrayList<Topics>();

	public String getKeyword_name() {
		return keyword_name;
	}

	public void setKeyword_name(String keyword_name) {
		this.keyword_name = keyword_name;
	}

	@Column(name = "keyword_clickNum")
	public Integer getKeyword_clickNum() {
		return keyword_clickNum;
	}

	public void setKeyword_clickNum(Integer keyword_clickNum) {
		this.keyword_clickNum = keyword_clickNum;
	}

	@ManyToOne
	public TopicType getTopicType() {
		return topicType;
	}

	public void setTopicType(TopicType topicType) {
		this.topicType = topicType;
	}

	@OneToMany(mappedBy = "tag", cascade = CascadeType.ALL)
	public List<Topics> getTopics() {
		return topics;
	}

	public void setTopics(List<Topics> topics) {
		this.topics = topics;
	}

	/*
	 * @ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE }, fetch =
	 * FetchType.LAZY, mappedBy="keywords") public List<Topics> getTopics() {
	 * return topics; }
	 * 
	 * public void setTopics(List<Topics> topics) { this.topics = topics; }
	 * 
	 */

}